package com.milling.business.service.impl;

import java.util.List;
import com.milling.common.utils.DateUtils;
import com.milling.common.utils.sql.DbUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.milling.business.mapper.WmsDrillinfoSettingMapper;
import com.milling.business.domain.WmsDrillinfoSetting;
import com.milling.business.service.IWmsDrillinfoSettingService;

/**
 * drillSettingService业务层处理
 *
 * @author X
 * @date 2025-03-18
 */
@Service
public class WmsDrillinfoSettingServiceImpl implements IWmsDrillinfoSettingService
{
    @Autowired
    private WmsDrillinfoSettingMapper wmsDrillinfoSettingMapper;

    /**
     * 查询drillSetting
     *
     * @param drillInfo drillSetting主键
     * @return drillSetting
     */
    @Override
    public WmsDrillinfoSetting selectWmsDrillinfoSettingByDrillInfo(String drillInfo)
    {
        return wmsDrillinfoSettingMapper.selectWmsDrillinfoSettingByDrillInfo(drillInfo);
    }

    /**
     * 查询drillSetting列表
     *
     * @param wmsDrillinfoSetting drillSetting
     * @return drillSetting
     */
    @Override
    public List<WmsDrillinfoSetting> selectWmsDrillinfoSettingList(WmsDrillinfoSetting wmsDrillinfoSetting)
    {
        return wmsDrillinfoSettingMapper.selectWmsDrillinfoSettingList(wmsDrillinfoSetting);
    }

    /**
     * 新增drillSetting
     *
     * @param wmsDrillinfoSetting drillSetting
     * @return 结果
     */
    @Override
    public int insertWmsDrillinfoSetting(WmsDrillinfoSetting wmsDrillinfoSetting)
    {
        wmsDrillinfoSetting.setCreateTime(DateUtils.getNowDate());
        return wmsDrillinfoSettingMapper.insertWmsDrillinfoSetting(wmsDrillinfoSetting);
    }

    /**
     * 修改drillSetting
     *
     * @param wmsDrillinfoSetting drillSetting
     * @return 结果
     */
    @Override
    public int updateWmsDrillinfoSetting(WmsDrillinfoSetting wmsDrillinfoSetting)
    {
        wmsDrillinfoSetting.setUpdateTime(DateUtils.getNowDate());
        return wmsDrillinfoSettingMapper.updateWmsDrillinfoSetting(wmsDrillinfoSetting);
    }

    /**
     * 批量删除drillSetting
     *
     * @param drillInfos 需要删除的drillSetting主键
     * @return 结果
     */
    @Override
    public int deleteWmsDrillinfoSettingByDrillInfos(String[] drillInfos)
    {
        return wmsDrillinfoSettingMapper.deleteWmsDrillinfoSettingByDrillInfos(drillInfos);
    }

    /**
     * 删除drillSetting信息
     *
     * @param drillInfo drillSetting主键
     * @return 结果
     */
    @Override
    public int deleteWmsDrillinfoSettingByDrillInfo(String drillInfo)
    {
        return wmsDrillinfoSettingMapper.deleteWmsDrillinfoSettingByDrillInfo(drillInfo);
    }
}
